﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GA.Shared.Interfaces;
using System.Windows;
using System.Runtime.Serialization;
using System.Windows.Data;

namespace GA.Shared.Objects
{
    public class SkillType : LinkedDependencyObject
    {
        /// <summary>
        /// Identifies the Id Property.
        /// </summary>
        public static readonly DependencyProperty IdProperty =
            RegisterProperty(
                "Id",
                typeof(int),
                typeof(SkillType),
                new PropertyMetadata(-1));

        /// <summary>
        /// Identifies the Name Property.
        /// </summary>
        public static readonly DependencyProperty NameProperty =
            RegisterProperty(
                "Name",
                typeof(string),
                typeof(SkillType),
                new PropertyMetadata(string.Empty));

        /// <summary>
        /// Identifies the MaximumLevel Property.
        /// </summary>
        public static readonly DependencyProperty MaximumLevelProperty =
            RegisterProperty(
                "MaximumLevel",
                typeof(int),
                typeof(SkillType),
                new PropertyMetadata(0));

        /// <summary>
        /// Identifies the RequiredSkillTypeId Property.
        /// </summary>
        public static readonly DependencyProperty RequiredSkillTypeIdProperty =
            RegisterProperty(
                "RequiredSkillTypeId",
                typeof(int?),
                typeof(SkillType),
                new PropertyMetadata(0));

        /// <summary>
        /// Identifies the RequiredSkillTypeLevel Property.
        /// </summary>
        public static readonly DependencyProperty RequiredSkillTypeLevelProperty =
            RegisterProperty(
                "RequiredSkillTypeLevel",
                typeof(int?),
                typeof(SkillType),
                new PropertyMetadata(0));

        /// <summary>
        /// Identifies the RequiredSkillType Property.
        /// </summary>
        public static readonly DependencyProperty RequiredSkillTypeProperty =
            RegisterProperty(
                "RequiredSkillType",
                typeof(SkillType),
                typeof(SkillType),
                new PropertyMetadata(0));

        /// <summary>
        /// Identifies the RequiredTypeName Property.
        /// </summary>
        public static readonly DependencyProperty RequiredTypeNameProperty =
            RegisterProperty(
                "RequiredTypeName",
                typeof(string),
                typeof(SkillType),
                new PropertyMetadata(string.Empty));

        /// <summary>
        /// Identifies the RequiredTypeAmount Property.
        /// </summary>
        public static readonly DependencyProperty RequiredTypeAmountProperty =
            RegisterProperty(
                "RequiredTypeAmount",
                typeof(int?),
                typeof(SkillType),
                new PropertyMetadata(null));

        /// <summary>
        /// Gets or sets the Id.
        /// </summary>
        
        public int Id
        {
            get { return (int)SafeGetValue(IdProperty); }
            set { SafeSetValue(IdProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Name.
        /// </summary>
        
        public string Name
        {
            get { return (string)SafeGetValue(NameProperty); }
            set { SafeSetValue(NameProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Maximum Level.
        /// </summary>
        
        public int MaximumLevel
        {
            get { return (int)SafeGetValue(MaximumLevelProperty); }
            set { SafeSetValue(MaximumLevelProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Required SkillType Id.
        /// </summary>
        
        public int? RequiredSkillTypeId
        {
            get { return (int?)SafeGetValue(RequiredSkillTypeIdProperty); }
            set { SafeSetValue(RequiredSkillTypeIdProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Required SkillType Level.
        /// </summary>
        
        public int? RequiredSkillTypeLevel
        {
            get { return (int?)SafeGetValue(RequiredSkillTypeLevelProperty); }
            set { SafeSetValue(RequiredSkillTypeLevelProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Required SkillType.
        /// </summary>
        
        public SkillType RequiredSkillType
        {
            get { return (SkillType)SafeGetValue(RequiredSkillTypeProperty); }
            set { SafeSetValue(RequiredSkillTypeProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Required TypeName.
        /// </summary>
        
        public string RequiredTypeName
        {
            get { return (string)SafeGetValue(RequiredTypeNameProperty); }
            set { SafeSetValue(RequiredTypeNameProperty, value); }
        }

        /// <summary>
        /// Gets or sets the Required TypeAmount.
        /// </summary>
        
        public int? RequiredTypeAmount
        {
            get { return (int?)SafeGetValue(RequiredTypeAmountProperty); }
            set { SafeSetValue(RequiredTypeAmountProperty, value); }
        }

        public SkillType()
        {
        }

        public SkillType(LinkedDependencyObject baseObject)
            : base(baseObject)
        {
        }

        public SkillType(LinkedDependencyObject baseObject, BindingMode bindingMode)
            : base(baseObject, bindingMode)
        {
        }
    }
}
